package com.syh.jn.scm.service.api.supplier.support.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;


public interface SupplierEnums {

  /**
   * 往来单位类型: 0供应商, 1客户, 2物流
   */
  @AllArgsConstructor
  @Getter
  public enum RelatedCompanyType {
    UPSTREAM(Short.valueOf("0"), "供应商"),
    DOWNSTREAM(Short.valueOf("1"), "客户"),
    LOGISTICS(Short.valueOf("2"), "物流");

    private Short status;
    private String statusName;

    @Override
    public String toString() {
      return this.status.toString();
    }

    public static RelatedCompanyType build(Short status) {
      switch (status) {
        case 0:
          return UPSTREAM;
        case 1:
          return DOWNSTREAM;
        case 2:
          return LOGISTICS;
      }
      return null;
    }
  }

  /**
   * 登录终端类型: DRIVER, SUPPLIER, UPSTREAM,DOWNSTREAM
   */
  @AllArgsConstructor
  @Getter
  public enum AccountType {
    UPSTREAM("UPSTREAM", "上游"),
    DOWNSTREAM("DOWNSTREAM", "下游"),
    SUPPLIER("SUPPLIER", "服务商"),
    DRIVER("DRIVER", "司机");

    private String status;
    private String statusName;

    @Override
    public String toString() {
      return this.status.toString();
    }
  }
}
